gdk/win32/gdkdevice-virtual.c: Various fixes
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 14 Aug 2013 10:46:15 +0000 (18:46 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 26 Aug 2013 02:30:13 +0000 (10:30 +0800)
...for the gdk_cursor_new_from_surface work (commit b2113b73) where the
types of some parameters were changed, and also to silence a critical
GDK_IS_DEVICE when a menu item is selected (courtesy of LE GARREC Vincent
from bug 696756).

https://bugzilla.gnome.org/show_bug.cgi?id=705980

gdk/win32/gdkdevice-virtual.c

index 8a77ebf501973c8d7bda84b672f646bb917a9cf7..f93c28a0c3b0d9b1998b5b0386e29f8c3aae0bfb 100644 (file)
@@ -41,8 +41,8 @@ static void gdk_device_virtual_set_window_cursor (GdkDevice *device,
                                                  GdkCursor *cursor);\r
 static void gdk_device_virtual_warp (GdkDevice *device,\r
                                     GdkScreen *screen,\r
-                                    gint       x,\r
-                                    gint       y);\r
+                                    gdouble   x,
+                                    gdouble   y);
 static void gdk_device_virtual_query_state (GdkDevice        *device,\r
                                            GdkWindow        *window,\r
                                            GdkWindow       **root_window,\r
@@ -234,8 +234,8 @@ gdk_device_virtual_set_window_cursor (GdkDevice *device,
 static void\r
 gdk_device_virtual_warp (GdkDevice *device,\r
                         GdkScreen *screen,\r
-                        gint       x,\r
-                        gint       y)\r
+                        gdouble   x,
+                        gdouble   y)
 {\r
   SetCursorPos (x - _gdk_offset_x, y - _gdk_offset_y);\r
 }\r
@@ -330,7 +330,7 @@ gdk_device_virtual_ungrab (GdkDevice *device,
       ReleaseCapture ();\r
     }\r
 \r
-  _gdk_display_device_grab_update (display, device, NULL, 0);\r
+  _gdk_display_device_grab_update (display, device, device, 0);
 }\r
 \r
 static void\r